import UIKit

import SnapKit

@objcMembers
public class NFFilterTextView: UIView {
    // 提示文本
    private lazy var sUnownedLabel: UILabel = {
        let concurrent = UILabel()
        concurrent.textColor = UIColor(red: 131.0 / 255.0, green: 130.0 / 255.0, blue: 134.0 / 255.0, alpha: 1.0)
        concurrent.font = .systemFont(ofSize: 16, weight: .medium)
        return concurrent
    }()

    // 箭头
    private lazy var bRuntimeImageView: UIImageView = {
        let sneakers = UIImageView()
        sneakers.image = .caTimagePath("vhimg_my_jtimg")
        return sneakers
    }()

    // UILabel
    private lazy var hBasketballLabel: UILabel = {
        let confirm = UILabel()
        confirm.textColor = UIColor(red: 49.0 / 255.0, green: 48.0 / 255.0, blue: 51.0 / 255.0, alpha: 1.0)
        confirm.font = .systemFont(ofSize: 16, weight: .medium)
        return confirm
    }()

    // UIImageView
    private lazy var gVisorImgView: UIImageView = {
        let bridge = UIImageView()
        bridge.image = .caTimagePath("")
        return bridge
    }()

    override init(frame: CGRect) {
        super.init(frame: frame)
        configTunnelAcaiViews()
    }

    required init?(coder: NSCoder) {
        super.init(coder: coder)
        configTunnelAcaiViews()
    }

    private func configTunnelAcaiViews() {
        // UI组件初始化
        /// 提示文本
        vhbsView.addSubview(sUnownedLabel)
        sUnownedLabel.snp.makeConstraints { make in
            make.top.equalTo(0)
            make.leading.equalTo(0)
            make.bottom.equalTo(-0)
        }

        /// 箭头
        vhbsView.addSubview(bRuntimeImageView)
        bRuntimeImageView.snp.makeConstraints { make in
            make.trailing.equalTo(-0)
            make.centerY.equalTo(10)
            make.width.equalTo(16)
            make.height.equalTo(16)
        }

        /// UILabel
        vhbsView.addSubview(hBasketballLabel)
        hBasketballLabel.snp.makeConstraints { make in
            make.leading.equalTo(10)
            make.centerY.equalTo(10)
        }

        /// UIImageView
        vhbsView.addSubview(gVisorImgView)
        gVisorImgView.snp.makeConstraints { make in
            make.trailing.equalTo(-10)
            make.centerY.equalTo(10)
            make.width.equalTo(26)
            make.height.equalTo(18)
        }
    }
}
